<html>
<head>
<?
	include_once ("config.php");
	include_once("functions.php");
	session_start();

	if (!$_SESSION['user'])
	{
		header("location:default.php");
	}
?>
	<script type="text/javascript" src="jquery.js"></script>
	<!--<link href="style.css" rel="stylesheet" type="text/css" />-->
	<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap-1.1.0.min.css"/>
</head>
<body>
<div id="container">
  <div id="top">
    <h1>Furball <span style="color: #A662AA;">Football</span></h1>
  </div>
  <div id="navcontainer">
    <ul id="navlist">
      <li id="active"><a href="draftpage.php" id="current">Draft</a></li>
      <li><a href="teampage.php">My Team</a></li>
	  <li><a href="logout.php">Log Out</a></li>
    </ul>
  </div>
  
  <?


$_SESSION['draft'] = getDraft(1);

if ($_SESSION['draft']->isOnClock($_SESSION['team']->draftOrder))
{
	echo "<div class='onClock'>Make A Selection</div>";
}
else
{
	$teamOnClock = findTeamFromDraftOrder($_SESSION['draft']);
	echo "<div class='notOnClock'>".$teamOnClock." is picking</div>";
}  
?>

  <div id="leftnav">
    <h1>Draft Stats</h1>
	<h2>Round: <?echo $_SESSION['draft']->currentRound?></h2>
	<h2>Pick: <?echo $_SESSION['draft']->currentPick?></h2>
	<br/>
	<h1>Last Picks</h1>
	<?echo getRecentSelections(3, $_SESSION['draft']->id)?>
  </div>